Skip to main content

FuroVestingRouter

FuroVestingRouter is the contract that is actually utilized directly for vesting tokens.

The full contract can be found here.

State-Changing Functions

createVesting

function createVesting(
IFuroVesting.VestParams memory vestParams,
uint256 minShare
) external payable returns (
uint256 depositedShares,
uint256 vestId,
uint128 stepShares,
uint128 cliffShares
);

Creates a new vesting schedule.

  • msg.sender should have already given the router an allowance of at least the vestParams.amount on the vestParams.token.
  • vestParams contains the details of the vesting schedule.
  • minShare sets a lower limit for the deposited shares.

Parameters

NameTypeDescription
vestParamsIFuroVesting.VestParamsStruct containing parameters for the vesting schedule.
minShareuint256The minimum amount of shares to be deposited. If not met, the function reverts.

Returns

NameTypeDescription
depositedSharesuint256Amount of shares deposited into the vesting schedule.
vestIduint256ID of the created vesting schedule.
stepSharesuint128The number of shares distributed at each step.
cliffSharesuint128The number of shares distributed after the cliff.

Reverts

This function reverts if the depositedShares is less than minShare.

Events

No events are directly emitted from this function. However, it calls createVesting function in furoVesting contract, which might emit events.